/*
 * Copyright 2023-2085 xujin <ceo@itgrail.com>
 *
 * Licensed under the Grail License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://itgrail.com/docs?id=3&catalogId=87
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.itgrail.pilot.infrastructure.tunnel.db.dataobject;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

import lombok.Data;
import static com.baomidou.mybatisplus.annotation.IdType.AUTO;

/**
 * @author halo codegen
 */
@TableName("t_department_user")
@Data
public class DepartmentUserDO {

    /**
     * 
     */
    @TableId(value = "id", type = AUTO)
    private Integer id;

    /**
     * 部门Id
     */
    @TableField(value = "department_id")
    private Integer departmentId;

    /**
     * 用户Id
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 逻辑删除标志
     */
    @TableField(value = "is_deleted")
    private String isDeleted;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    private LocalDateTime createAt;

    /**
     * 更新时间
     */
    @TableField(value = "update_at")
    private LocalDateTime updateAt;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private String updateBy;

    @TableField(exist = false)
    private UserDO user;

    public DepartmentUserDO(Integer id, Integer departmentId, Integer userId, String isDeleted, LocalDateTime createAt, LocalDateTime updateAt, String createBy, String updateBy) {
        this.id = id;
        this.departmentId = departmentId;
        this.userId = userId;
        this.isDeleted = isDeleted;
        this.createAt = createAt;
        this.updateAt = updateAt;
        this.createBy = createBy;
        this.updateBy = updateBy;
    }

}